package cn.wolfcode.domain;

public class Customer {

    private Integer id;
    private String name;
    private boolean genderStr;
    private Integer age;
    private String tel;
    private String qq;
    private Job job;
    private Source source;
    private Seller seller;
    private String statusStr;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGenderStr() {
        return genderStr ? "男" : "女";
    }

    public void setGenderStr(boolean genderStr) {
        this.genderStr = genderStr;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public Job getJob() {
        return job;
    }

    public void setJob(Job job) {
        this.job = job;
    }

    public Source getSource() {
        return source;
    }

    public void setSource(Source source) {
        this.source = source;
    }

    public Seller getSeller() {
        return seller;
    }

    public void setSeller(Seller seller) {
        this.seller = seller;
    }

    public String getStatusStr() {

        switch (statusStr){
            case "0":statusStr="潜在客户";break;
            case "1":statusStr="正式客户";break;
            case "2":statusStr="资源池客户";break;
            case "3":statusStr="失败客户";break;
            case "4":statusStr="流失客户";break;
        }
        return statusStr;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", genderStr=" + genderStr +
                ", age=" + age +
                ", tel='" + tel + '\'' +
                ", qq='" + qq + '\'' +
                ", job=" + job.getTitle() +
                ", source=" + source.getTitle() +
                ", seller=" + seller.getName() +
                ", statusStr='" + statusStr + '\'' +
                '}';
    }
}
